import request from "@/utils/request";

export function getCouponList(params) {
  return request({
    url: "back/shop/commodityCoupon?type=list",
    method: "get",
    params
  });
}

export function addCoupon(data) {
  return request({
    url: "back/shop/commodityCoupon?type=change",
    method: "post",
    data
  });
}

export function getCouponDetail(params) {
  return request({
    url: "back/shop/commodityCoupon?type=coupon",
    method: "get",
    params
  });
}

export function deleteCoupon(data) {
  return request({
    url: "back/shop/commodityCoupon?type=delete",
    method: "post",
    data
  });
}